#version 430 
layout(location= 0) uniform mat4 MMatrix;
layout(location= 1) uniform mat4 MVPMatrix;
layout(location= 3) uniform mat3 NormalMatrix;
layout(location= 4) uniform vec3 eyePostion;

layout(location= 0) in vec4 pos;
layout(location= 1) in vec3 normal;

out vec3 vpos;
out vec3 vnormal;
out vec3 veye;

void main()
{
	gl_Position = MVPMatrix*pos;
	vnormal = normalize(NormalMatrix * normal);
	vpos = (MMatrix * pos).xyz;
	veye = eyePostion;
}
